package demo3;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-04-09
 * Time: 20:04
 */
abstract class Shape {

    abstract void draw();
}

abstract class circle extends Shape {
    @Override
    public void draw() {
        System.out.println("我要画圆形！！！");
    }
}

class rect extends Shape {
    @Override
    public void draw() {
        System.out.println("我要画矩形！！！");
    }
}

public class TestDemo3 {
    public static void drawShape(Shape shape) {
        shape.draw();
    }

    public static void main(String[] args) {
     //   Shape shape = new Shape();

//        drawShape(new circle());
//        drawShape(new rect());
    }
}
